package com.common.utils.constant;

/**
 * 描述：
 * sql常量
 * @author xianggj
 * @Date 2021/11/2 9:36
 **/
public final class SQLConstants {

    /**
     * 空
     */
    public static final String BLANK = " ";

    /**
     * select
     */
    public static final String SELECT = " SELECT ";

    /**
     * select
     */
    public static final String SELECT_All = " SELECT * FROM ";

    /**
     * from
     */
    public static final String FROM = " FROM ";

    /**
     * as
     */
    public static final String AS = " AS ";

    /**
     * insert into
     */
    public static final String INSERT_INFO = " INSERT INTO ";

    /**
     * mysql 专有替换
     * 其他数据库不一样 比如hive的insert overwrite
     */
    public static final String REPLACE_INFO = " REPLACE INTO ";

    /**
     * update
     */
    public static final String UPDATE = " UPDATE ";

    /**
     * set
     */
    public static final String SET = " SET ";

    /**
     * mysql转义符
     */
    public static final String MYSQL_ESC = "`";

    /**
     * pg转义符
     */
    public static final String PG_ESC = "\"";

    /**
     * oracle转义符
     */
    public static final String ORACLE_ESC = "\"";

    /**
     * where
     */
    public static final String WHERE = " WHERE ";

    /**
     * id
     */
    public static final String ID = "id";

    /**
     * 等于
     */
    public static final String EQ = " = ";

    /**
     * 左括号
     */
    public static final String LEFT_BRACKET = " ( ";

    /**
     * 右括号
     */
    public static final String RIGHT_BRACKET = " ) ";

    /**
     * values
     */
    public static final String VALUES = " VALUES ";

    /**
     * ?
     */
    public static final String QUESTION = " ? ";

    /**
     * 逗号
     */
    public static final String COMMA = ",";


    /**
     * 创建表
     */
    public static final String CREATE_TABLE = "CREATE TABLE ";


    /**
     * 是不存在则
     */
    public static final String IF_NOT_EXISTS  = " IF NOT EXISTS ";

    /**
     * 表示存在则
     */
    public static final String IF_EXISTS  = " IF EXISTS ";

    /**
     * 表示存在则
     */
    public static final String WITH  = " WITH ";
    /**
     * *
     */
    public static final String STAR  = " * ";

    /**
     * on
     */
    public static final String ON  = " on ";


    /**
     * CONFLICT
     */
    public static final String CONFLICT   = " CONFLICT  ";

    /**
     * do
     */
    public static final String DO   = " DO  ";

}
